home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
011
/
fixega.arc
/
FIXEGA.DOC
Wrap
Text File
|
1986-09-23
|
4KB
|
149 lines
NOTES ON PATCHING COLOR-GRAPHICS PROGS TO RUN
ON EGA CARD.
1. Problem is program doing OUTs to specific addr in the
COLOR- GRAPHICS CARD.
2. Procedure is to locate and NOP these and only these OUTs.
3. The addr on the CGA that causes the problem is:
--03D4--
4. The OUT instrustion looks like this in assembler:
OUT DX,AL
where for our problem DX has been previously loaded
with the fateful --03D4--.
5. This load usually takes the form of a MOV thusly ..
again in assembler:
MOV DX,03D4
6. Therefore before we can zap (nop) the offending OUT
we need to make sure it is guilty. We need to find
the MOV that fools around with DX and addr 03D4.
and follow the code from there to find the OUT instr.
logically following that MOV inst. This is usually
easy but look out for jumps that can change sequence.
Usually though the OUT occurs close to the MOV.
7. If the offending program was written in a "high" level
language the code pattern of the MOV , the OUT and
any instructions in-between are usually the same and
pretty straight forward.
8. OK .. the example of this unnecessary necessary nonsense
we will use is Gertrude's Puzzles. (Trade Mark of the
Learning Company)(Copyright the Learning Company)
Version 1.00 (Copyright IBM).
9. First you must become a licensed user of GP.(otherwise
you wouldn't have the problem..right ?)
10. Next you must make a copy of this hummer that is
not Write protected but still is Copyprotected (as is
your licensed copy) DO THIS WORK ON THE COPY NOT THE ORIGINAL.
I had to say it.
11. Now you must locate the offending progarm if there is
more than one candidate (and there are in this example).
This can be time consuming but not too difficult. (just
look for the MOV DX,03D4 instructions)
In our case it's simple. The name of the prog. is
COLORTST.EXE.
12. So go read up on DEBUG (I had to) and join me in step 13.
13.
Rename the EXE file to something DEBUG can handle, thusly.
A> rename colortst.exe colortst.x
Start DEBUG against COLORTST.X
A> debug colortst.x
Debug responds:
- (some response)
Search for the hex pattern for the MOV DX,03D4 ....
- s cs:0 ffff ba,d4,03 (0 ffff = top to bottom)
Debug responds:
xxxx:048C
xxxx:049E
xxxx:04B7
-
Now lets go look for our OUT (it's simple this time)
We will unassemble a "window" of code to see if we can find
the OUT. ( I know where it is so our window will be small..
but you will probably need a larger amount of code unassembled
in other programs)
- u 048C 048F (tiny window)
Debug responds:
xxxx:048C BAD403 MOV DX,03D4
xxxx:048F EE OUT DX,AL <--- there it is !
-
So let's git da little rascal !
- e 048F 90 < be careful of your address and this will
NOP your OUT not something else.
Debug responds:
-
Lets look to see if it worked ?
- u 048C 048F
Debug responds:
xxxx:048C BAD403 MOV DX,03D$
xxxx:048C 90 NOP <--- gottim !
-
: Now do the same for the other two addresses we found ..
:
: remember ?.. xxxx:049E
: xxxx:04B7
:
: and you are almost done..
Don't forget to WRITE OUT THE CHANGES !
Tell debug:
- w
then quit Debug:
- q
Now rename the COLORTST.X file to it's original name.
A> rename colortst.x colortst.exe
THAT's IT.. no guarantees but it worked for me.
14. OK thats that.. I know it's only one way to skin the cat
but maybe it will get the cat worried. Get those creative
juices flowing and find a better way .. Let the BBS's know
if you come up with patches to other programs that will
allow us EGA (spelled high tech) folks to use all that
software we bought for our kids when we had CGA cards.
081885wzp.